import { Controller, Get, Post, Query } from "@nestjs/common";
import { AdService } from "../../services/ad/ad.service";
import { BulletinService } from "../../services/bulletin/bulletin.service";
import { ApiTags, ApiResponse, ApiQuery, ApiBody} from '@nestjs/swagger';
import { Ad } from "../../entities/ad.entities";
import { ConfigService } from "../../config/config.service";

@ApiTags("index")
@Controller('api/index')
export class IndexController {
  configService: ConfigService;
  constructor(){
    this.configService=new ConfigService('src/env/alipay.env');
  }

  @Get('getconfig')
  async getConfig(){
    const appid=this.configService.get('appid');
    console.log(appid);
    return appid;
  }

}
